package com.bite.libraries.service;

import com.bite.libraries.dao.BookDao;
import com.bite.libraries.model.BookInfo;

import java.util.ArrayList;
import java.util.List;

public class BookService {
    public List<BookInfo> getBookList(){
        BookDao bookDao = new BookDao();
        List<BookInfo> bookInfos = bookDao.mockData();
        for (BookInfo bookInfo:bookInfos){
            if (bookInfo.getStatus() == 2){
                bookInfo.setStatusCN("不可借阅");
            }else {
                bookInfo.setStatusCN("可借阅");
            }
        }
        return bookInfos;
    }
}
